﻿using Aspire.Domain.Core;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Aspire.Repository.EfCore
{
    public class BaseEfCoreEntity<TId> : BaseEntity<TId>
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public override TId Id { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public override DateTime CreatedAt { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public override DateTime UpdatedAt { get; set; } = DateTime.MaxValue;

        public override bool IsDelete { get; set; } = false;

        public override DateTime DeleteAt { get; set; } = DateTime.MaxValue;
    }
}
